import { sum } from "./utils/math"
import axios from "axios"
import type { AxiosRequestConfig, AxiosInstance } from "axios"
import React from "react"
import _ from "lodash"
import LaoDaImg from "./img/laoda.png"
import App from "./vue/App.vue"

const message: string = "Hello World"
console.log(message.length, message)
console.log(sum(20, 30))

// lib.dom.d.ts
const h2El = document.createElement("h2")
h2El.textContent = "Hello Typescript"
document.body.append(h2El)

// lib.es2015.d.ts
const promise = new Promise((resolve, reject) => {})
console.log(message.startsWith("Hello"))

// axios

// lodash
console.log(_.join(["abc", "cba"]))
type IDType = number | string

// 给自己的代码添加类型声明文件
const id1: IDType = 123

// 需要编写类型声明
console.log(personName, personAge, personHeight)

console.log(foo("Hello"))

const p = new Person("baki", 18)
console.log(p);

// 图片文件的使用
const imgEl = document.createElement("img")
imgEl.src = LaoDaImg
document.body.append(imgEl)

$.ajax({
    url:"http://codercba.com:1888/airbnb/api/home/discount"
})